package com.ysyc.driver_ee.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * <p>描述：(这里用一句话描述这个类的作用)</p>
 * 作者： Chan<br>
 * 日期： 2018/11/5 13:16<br>
 * 版本： v1.0<br>
 */
public class DriverInfo implements Parcelable {

    /**
     * 司机ID
     */
    public Integer id;

    /**
     * 司机姓名
     */
    public String driverName;
    /**
     * 认证状态 0为未认证 1为认证中 2为认证成功
     */
    public Integer authStatus;
    /**
     * 运输状态 0位空闲 1为待装货 2为已到达装货地 3为运输中
     */
    public Integer transportStatus;
    /**
     * 上级队长id 不存在则为 0
     */
    public Integer pid;
    /**
     * 司机身份 0为司机 1为负责人
     */
    public Integer identity;
    /**
     * 车牌所属区域中文 鄂
     */
    public String carFormCn;
    /**
     * 车牌号   A123456
     */
    public String carNumber;
    /**
     * 本月收入
     */
    public String cycleIncome;
    /**
     * 总收入
     */
    public String totalIncome;
    /**
     * 司机所在地名字，如光谷生物城
     */
    public String driverMapName;
    /**
     * 待完成订单
     */
    public Integer pendingOrderNum;
    /**
     * 今日流水
     */
    public Integer todayWater;
    /**
     * 累计流水
     */
    public Integer totalWater;
    /**
     * 今日成单量
     */
    public Integer todayOrderNum;
    /**
     * 总成单量
     */
    public Integer totalOrderNum;
    /**
     * 手机号码
     */
    public String telPhone;


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.id);
        dest.writeString(this.driverName);
        dest.writeValue(this.authStatus);
        dest.writeValue(this.transportStatus);
        dest.writeValue(this.pid);
        dest.writeValue(this.identity);
        dest.writeString(this.carFormCn);
        dest.writeString(this.carNumber);
        dest.writeString(this.cycleIncome);
        dest.writeString(this.totalIncome);
        dest.writeString(this.driverMapName);
        dest.writeValue(this.pendingOrderNum);
        dest.writeValue(this.todayWater);
        dest.writeValue(this.totalWater);
        dest.writeValue(this.todayOrderNum);
        dest.writeValue(this.totalOrderNum);
        dest.writeString(this.telPhone);
    }

    public DriverInfo() {
    }

    protected DriverInfo(Parcel in) {
        this.id = (Integer) in.readValue(Integer.class.getClassLoader());
        this.driverName = in.readString();
        this.authStatus = (Integer) in.readValue(Integer.class.getClassLoader());
        this.transportStatus = (Integer) in.readValue(Integer.class.getClassLoader());
        this.pid = (Integer) in.readValue(Integer.class.getClassLoader());
        this.identity = (Integer) in.readValue(Integer.class.getClassLoader());
        this.carFormCn = in.readString();
        this.carNumber = in.readString();
        this.cycleIncome = in.readString();
        this.totalIncome = in.readString();
        this.driverMapName = in.readString();
        this.pendingOrderNum = (Integer) in.readValue(Integer.class.getClassLoader());
        this.todayWater = (Integer) in.readValue(Integer.class.getClassLoader());
        this.totalWater = (Integer) in.readValue(Integer.class.getClassLoader());
        this.todayOrderNum = (Integer) in.readValue(Integer.class.getClassLoader());
        this.totalOrderNum = (Integer) in.readValue(Integer.class.getClassLoader());
        this.telPhone = in.readString();
    }

    public static final Parcelable.Creator<DriverInfo> CREATOR = new Parcelable.Creator<DriverInfo>() {
        @Override
        public DriverInfo createFromParcel(Parcel source) {
            return new DriverInfo(source);
        }

        @Override
        public DriverInfo[] newArray(int size) {
            return new DriverInfo[size];
        }
    };
}
